<!--{template admin/tpl/header}-->

<div class="mainarea">
	<div class="maininner">
	<!--{if $allowmanage}-->
	<div class="tabs_header">
		<ul class="tabs">
			<li $actives[all]><a href="admincp.php?ac=article"><span>浏览全部文章</span></a></li>
			<li $actives[add]><a href="###"><span>添加文章</span></a></li>
			<li $actives[edit]><a href="###"><span>修改文章</span></a></li>
		</ul>
	</div>
	<!--{/if}-->

<!--{if $_GET['op']!='add'&&$_GET['op']!='edit'}-->
	
	<form method="get" action="admincp.php">
	<div class="block style4">
		<table cellspacing="3" cellpadding="3">

		<!--{if $allowmanage}-->
		<tr>
			<th>作者UID</th><td><input type="text" name="uid" value="$_GET[uid]"></td>
		</tr>
		<!--{/if}-->

		<tr><th>发布时间</th><td colspan="3">
			<input type="text" name="atime1" value="$_GET[atime1]" size="10"> ~
			<input type="text" name="atime2" value="$_GET[atime2]" size="10"> (YYYY-MM-DD)
		</td></tr>
		
		<tr><th>结果排序</th>
		<td colspan="3">
		<select name="orderby">
		<option value="">默认排序</option>
		<option value="atime"$orderby[atime]>发布时间</option>
		</select>
		<select name="ordersc">
		<option value="desc"$ordersc[desc]>递减</option>
		<option value="asc"$ordersc[asc]>递增</option>
		</select>
		<select name="perpage">
		<option value="20"$perpages[20]>每页显示20个</option>
		<option value="50"$perpages[50]>每页显示50个</option>
		<option value="100"$perpages[100]>每页显示100个</option>
		</select>
		<input type="hidden" name="ac" value="article">
		<input type="submit" name="searchsubmit" value="搜索" class="submit">
		</td>
		</tr>
		</table>
	</div>
	</form>
<!--{/if}-->
<!--{if $_GET['op']=='edit'||$_GET['op']=='add'}-->
	<script language="javascript" src="image/editor/editor_function.js"></script>
	<script language="javascript" src="source/script_upload_jq.js"></script>
	<form method="post" action="admincp.php?ac=article" enctype="multipart/form-data">
	<div class="bdrcontent">
		<div class="cont">
			<div class="cont_name"><span class="cont_t">文章标题：</span><input type="text" name="title" value="$art['title']" /></div>
			<div class="cont_type"><span class="cont_t">小标题：</span><input type="text" name="stitle" value="$art['stitle']" /></div>
			<div class="cont_type"><span class="cont_t">关键词：</span><input type="text" name="keywords" value="$art['keywords']" />(用";"号隔开)</div>
			<div class="cont_content" style="margin-bottom:5px;"><span class="cont_t" style="float:left;">内容简介：</span><textarea name="description" style="height:100px;width:400px;">$art['description']</textarea></div>
			<div class="cont_type"><span class="cont_t">文章来源：</span><input type="text" name="source" value="$art['source']" /></div>
			<div class="cont_type"><span class="cont_t">文章作者：</span><input type="text" name="writer" value="$art['writer']" /></div>
			<div class="cont_type"><span class="cont_t">点击数量：</span><input type="text" name="click" value="$art['click']" /></div>
			<div class="cont_type">
				<span class="cont_t">所属栏目：</span>
				<select name="typeid">
					$type
				</select>
			</div>
			<div class="cont_content">
				<span class="cont_t">文章内容：</span><a id="doodleBox" href="magic.php?mid=doodle&showid=blog_doodle&target=uchome-ttHtmlEditor&from=editor" style="display:none"></a><textarea class="userData" name="body" id="uchome-ttHtmlEditor" style="height:100%;width:100%;display:none;border:0px">$art['body']</textarea><iframe src="editor.php?charset=$_SC[charset]&allowhtml=1" name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:100%;border: 1px solid #C5C5C5;" height="400"></iframe>
			</div>
			<div class="cont_flie"><span class="cont_t">上传图片：</span><input type="text" id='image_1_link' name="pic" size="40" value="$art['pic']" /> <input type="button" name="clickbutton[]" value="上传" class="button" onclick="uploadsimg('image_1_link')" />(通过此处上传要用的图片)</div>
			<input type="hidden" name="op" value="$op" />
			<!--{if $_GET['op']=='edit'}--><input type="hidden" name="aid" value="$aid" /><!--{/if}-->
			<div class="cont_submit"><input type="submit" name="submit" value="发布" onclick="edit_save();" /><a href="admincp.php?ac=article">返回</a></div>
		</div>
	</div>
	</form>
<!--{else}-->
	<div class="rel_t"><a href="admincp.php?ac=article&op=add">发布新文章</a></div>
	<!--{if $list}-->
	<div class="bdrcontent">
		<table class="cont_c">
			<tr class="cont_c_t">
				<td width="8%">文章id</td>
				<td width="8%">发布者id</td>
				<td width="30%">文章标题</td>
				<td width="10%">所属栏目</td>
				<td width="10%">发布时间</td>
				<td width="10%">点击数量</td>
				<td width="10%">文章状态</td>
				<td width="14%">操作</td>
			</tr>
			<!--{loop $list $value}-->
			<tr class="cont_c_c">
				<td>$value['aid']</td>
				<td>$value['uid']</td>
				<td>$value['title']</td>
				<td>$value['typename']</td>
				<td><!--{date('m-d H:i',$value['atime'],1)}--></td>
				<td>$value['click']</td>
				<td>
					<!--{if $value['arcrank'] > 0}-->
						开放阅读
					<!--{else}-->
						审核中
					<!--{/if}-->
				</td>
				<td><a href="admincp.php?ac=article&op=edit&aid=$value['aid']">修改</a>|<!--{if $value['arcrank'] < 1}--><a href="admincp.php?ac=article&op=check&aid=$value['aid']">审核</a>|<!--{/if}--><a href="admincp.php?ac=article&op=del&aid=$value['aid']">删除</a></td>
			</tr>
			<!--{/loop}-->
		</table>
		<div class="page" style="clear:both;margin:10px 5px;">$multi</div>
	</div>
	<!--{else}-->
	<div class="bdrcontent">
		<p>指定条件下还没有数据</p>
	</div>
	<!--{/if}-->

<!--{/if}-->

	</div>
</div>
<div class="side">
	<!--{template admin/tpl/side}-->
</div>

<!--{template admin/tpl/footer}-->